package com.moyq5.mvc.maker.test.bean.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import com.moyq5.mvc.maker.test.bean.enums.SysAccountType;

/**
 * 交易银行账户，包括支付账户、收款账户
 * @author Moyq5
 * @date 2017年12月12日
 */
@Entity
@Table(name = "tra_account")
@DynamicUpdate
public class TraAccount implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 账户ID（主键）
	 */
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "native")@GenericGenerator(name = "native", strategy = "native")
    @Column(name = "account_id")
	private Long accountId;
	/**
	 * 真实姓名
	 */
	@Column(name = "real_name", length = 60)
	private String realName;
	/**
	 * 身份证号
	 */
	@Column(name = "id_no", length = 30)
	private String idNo;
	/**
	 * 手机号
	 */
	@Column(name = "mobile", length = 11)
	private String mobile;
	/**
	 * 卡号
	 */
	@Column(name = "account_no", length = 20, nullable = false)
	private String accountNo;
	/**
	 * 账户名称
	 */
	@Column(name = "account_name", length = 60, nullable = false)
	private String accountName;
	/**
	 * 账户类型
	 */
    @Enumerated(EnumType.ORDINAL)
    @Column(name = "account_type", precision = 2, nullable = false)
	private SysAccountType accountType;
	/**
	 * 支付行号
	 */
	@Column(name = "bank_no", length = 20)
	private String bankNo;
	/**
	 * 支行名称
	 */
	@Column(name = "bank_name", length = 60)
	private String bankName;
	/**
	 * 总行行号
	 */
	@Column(name = "head_no", length = 20)
	private String headNo;
	/**
	 * 总行名称
	 */
	@Column(name = "head_name", length = 60)
	private String headName;
	/**
     * 开户省份
     */
    @Column(name = "province", length = 60)
	private String province;
    /**
     * 开户城市
     */
    @Column(name = "city", length = 60)
	private String city;
	
	public Long getAccountId() {
		return accountId;
	}
	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getIdNo() {
		return idNo;
	}
	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getAccountNo() {
		return accountNo;
	}
	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}
	public String getAccountName() {
		return accountName;
	}
	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}
	public SysAccountType getAccountType() {
		return accountType;
	}
	public void setAccountType(SysAccountType accountType) {
		this.accountType = accountType;
	}
	public String getBankNo() {
		return bankNo;
	}
	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}
	public String getBankName() {
		return bankName;
	}
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	public String getHeadNo() {
		return headNo;
	}
	public void setHeadNo(String headNo) {
		this.headNo = headNo;
	}
	public String getHeadName() {
		return headName;
	}
	public void setHeadName(String headName) {
		this.headName = headName;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	
}
